/**
 * Created by yoyoyk on 2017/5/11.
 */

import Relay from "react-relay";
export default class getPackStepInfo extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { getPackStepInfo }`;
    }

    getVariables() {
        return {
            argsInput: {
                pdId:this.props.pdId,
                stepContent:this.props.stepContent,
                uid:this.props.uid,
                packStepId:this.props.packStepId,
                token:this.props.token,
                fileJson:this.props.fileJson,
                imgJson:this.props.imgJson
            }
        }
    }

    getFatQuery() {
        return Relay.QL`fragment on getPackStepInfoPayload {
            clientMutationId
            getPackStepInfo{
                authorityId
                totalResult
                token
                value
                userId
                packStep{
                    pdId
                    stepContent
                    imgJson
                    packStepId
                    fileJson
                }
                errorCode
                id
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
               fragment on getPackStepInfoPayload  {
                      clientMutationId
                        getPackStepInfo{
                            authorityId
                            totalResult
                            token
                            value
                            userId
                            packStep{
                                pdId
                                stepContent
                                imgJson
                                packStepId
                                fileJson
                            }
                            errorCode
                            id
                        }
                 }
            `]
        }];
    }

}
